<html>
    <head>
        <title>Xmpp4Js Sample Client</title>
			<script type="text/javascript" src="lib/log4js.js"></script>
            <script type="text/javascript" src="lib/prototype.js"> </script> 
            <script type="text/javascript" src="lib/dom-all.js"></script>
            <script type="text/javascript" src="lib/crypto.js"></script>
            <script type="text/javascript" src="lib/xmpp4js.js"></script>
			<script type="text/javascript" src="xmpp4gg.js"></script>
            
    </head>
    
    <body>
        <div id="login-panel">
            <form onsubmit="return client.login(this.username.value, this.password.value, this.domain.value, this.resource.value, this.endpoint.value)">
                <dl>
                    <dt>Domain</dt>
                    <dd><input type="text" name="domain" value=""/></dd>
                    
                    <dt>Username</dt>
                    <dd><input type="text" name="username" value=""/></dd>
                    
                    <dt>Password</dt>
                    <dd><input type="password" name="password" value=""/></dd>
                    
                    <dt>Transport</dt>
                    <dd><select name="transport" onchange="this.form.endpoint.value = (this.value == 'script' ? '/http-bind/' : '/http-bind/');">
                        <option value="script" onclick="">Script (X-Domain)</option>
                        <option value="bosh">BOSH (Local Servlet)</option>
                    </select></dd>
                    
                    <dt>Transport Endpoint</dt>
                    <dd><input type="text" name="endpoint" value=""/></dd>
					
					<dt>Resource</dt>
                    <dd><input type="text" name="resource" value=""/></dd>
                    
                    <dt></dt>
                    <dd><button type="submit">Login</button></dd>
                    
                       
                    <dt>Security Exception</dt>
                    <dd>
                        <button onclick="document.location.href=this.form.endpoint.value">Can't Connect? Add Exception</button><br/>
                        <small>Add the exception when prompted, and come back to this page</small>
                    </dd>
                </dl>
            </form>
        </div>
        
        <div id="message-panel">
            <div id="message-area">
                
            </div>
            <form id="message-form" onsubmit="return client.sendMessage(this.to.value, this.message.value)">
                <dl>
                    <dt>To</dt>
                    <dd>
                        <input type="text" name="to" size="30" value="harlan@soashable.com"/>
                    </dd>
                    <dt>Message</dt>
                    <dd>
                        <textarea name="message" rows="4" cols="60"></textarea>
                    </dd>
                    <dt></dt>
                    <dd><button type="submit">Send</button></dd>
                </dl>
            </form>
        </div>
        
        <div id="control-panel">
            <button onclick="client.close()">Disconnect.</button>
        </div>

        <style type="text/css">
<!--

#message-area {
    height: 15em;
    width: 50em;
    overflow: auto;
    scoll: auto;
    
}

#message-form {
   display: none; 
}

#control-panel {
    display: none;
}

-->
        </style>
        
    </body>
</html>